<!DOCTYPE html>
<html>

<head lang="en">
    <title>狼码一站式商城-分类</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/strategy.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>

    <script>

        $(function () {
            //获取所有为热门状态的目录
            $.get(baseUrl+"/productCatalogs",{state:1},function (data) {
                var temp = '';
                var content = '';
                $.each(data, function (index, ele) {
                    console.log(data);
                    console.log(data.id);
                    temp += '<li class="nav-item" data-id="' + ele.id + '"><a class="nav-link" data-toggle="pill" href="#pills-' + ele.id + '">' + ele.title + '</a></li>';
                    content += '<div class="tab-pane fade" id="pills-' + ele.id + '">'+ele.id+'</div>';
                })
                $("#pills-tab").append(temp);//标题
                $("#pills-tabContent").append(content);//内容
            });
        });

    </script>
</head>

<body>
<div class="search-head">
    <div class="row nav-search">
        <div class="col-2">
            <a href="index.html">
                <span><i class="fa fa-chevron-left fa-2x"></i></span>
            </a>
        </div>
        <div class="col-10">
            <div class="input-group-sm search">
                <input class="form-control searchBtn" placeholder="找类别">
            </div>
        </div>
    </div>
</div>

<ul class="nav nav-pills nav-justified border border-left-0 border-top-0 border-right-0" id="pills-tab" role="tablist">
    <li class="nav-item">
        <a class="nav-link active show" data-toggle="pill" href="#pills-top">
            <span style="font-weight: bold;">热门</span>
        </a>
    </li>
</ul>


<div class="tab-content" id="pills-tabContent">
    <div class="tab-pane fade active show" id="pills-top">
        <div class="container commend">
            <a render-fun="getHref" render-key="travelId" data-url="/travelContent.html?id=">
                <img render-src="coverUrl">
                <p render-html="title"></p>
            </a>
        </div>
        <hr>

        <div class="container strategyCommend">
            <h6>当季推荐</h6>
            <div class="row hot" render-loop="list">
                <div class="col-4">
                    <a render-key="list.id" render-fun="getHref" data-url="/strategyCatalogs.html?id=">
                        <img render-src="list.coverUrl">
                        <p render-html="list.title"></p>
                    </a>
                </div>
            </div>
        </div>
    </div>

</div>


</body>

</html>